package com.sreasons.prjhotel.model;

import java.io.Serializable;
import java.math.BigDecimal;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;



@Entity
@Table(name="factura_detalle")
public class FacturaDetalle implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -6438569772117116891L;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="idfact")
	private Factura factura;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="idesta")
	private Estadia estadia;
	
	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name="idfact", column = @Column(name="idfact")),
			@AttributeOverride(name="idesta",column = @Column(name="idesta"))})
	private FacturaDetalleId id;
	
	public FacturaDetalleId getId() {
		return id;
	}
	public void setId(FacturaDetalleId id) {
		this.id = id;
	}
	@Column
	private BigDecimal costo;
	
	@Column
	private BigDecimal igv;
	
	@Column
	private BigDecimal descu;
	
	@Column
	private BigDecimal total;
	
	
	
	
	public BigDecimal getCosto() {
		return costo;
	}
	public void setCosto(BigDecimal costo) {
		this.costo = costo;
	}
	public BigDecimal getIgv() {
		return igv;
	}
	public void setIgv(BigDecimal igv) {
		this.igv = igv;
	}
	public BigDecimal getDescu() {
		return descu;
	}
	public void setDescu(BigDecimal descu) {
		this.descu = descu;
	}
	public BigDecimal getTotal() {
		return total;
	}
	public void setTotal(BigDecimal total) {
		this.total = total;
	}
	public Estadia getEstadia() {
		return estadia;
	}
	public void setEstadia(Estadia estadia) {
		this.estadia = estadia;
	}
	public Factura getFactura() {
		return factura;
	}
	public void setFactura(Factura factura) {
		this.factura = factura;
	}
	

	
	
}
